package com.jinzhi.jzweb.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.jinzhi.common.base.CoreServiceImpl;
import com.jinzhi.jzapi.certificate.pojo.ExpertsVo;
import com.jinzhi.jzapi.certificate.pojo.MyExpertsVo;
import com.jinzhi.jzapi.training.pojo.TerExpertsVo;
import com.jinzhi.jzweb.dao.ExpertsDao;
import com.jinzhi.jzweb.domain.ExpertsDO;
import com.jinzhi.jzweb.service.ExpertsService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 
 * <pre>
 * 专家表
 * </pre>
 * <small> 2020-02-24 21:00:11 | lance</small>
 */
@Service
public class ExpertsServiceImpl extends CoreServiceImpl<ExpertsDao, ExpertsDO> implements ExpertsService {
    @Override
    public Page<ExpertsVo> selectListPage(int current, int number, Map map) {
        // 新建分页
        Page<ExpertsVo> page = new Page<ExpertsVo>(current, number);
        return page.setRecords(this.baseMapper.dyGetUserList(page,map));
    }

    @Override
    public Long selById(Map map){
        return baseMapper.selById(map);
    }

    @Override
    public Page<MyExpertsVo> selByUserId(int current, int number, Long userId) {
        // 新建分页
        Page<MyExpertsVo> page = new Page<MyExpertsVo>(current, number);
        return page.setRecords(this.baseMapper.selByUserId(page,userId));
    }

    @Override
    public int selNoReviewAll(){
        return this.baseMapper.selNoReviewAll();
    }

    @Override
    public List<Map<Object,Object>> selRandExpList(Map map){
        return this.baseMapper.selRandExpList(map);
    }

    @Override
    public List<Map<Object,Object>> selOrgRandExpList(Map map){
        return this.baseMapper.selOrgRandExpList(map);
    }

    @Override
    public List<Map> selByTypeProvince(Map map){
        return this.baseMapper.selByTypeProvince(map);
    }

    @Override
    public List<Map> selByTypeNoProvince(Map map){
        return this.baseMapper.selByTypeNoProvince(map);
    }

    @Override
    public List<Map> selByOrgType(Map map){
        return this.baseMapper.selByOrgType(map);
    }

    @Override
    public List<Map> selTeacher(Map map){
        return this.baseMapper.selTeacher(map);
    }

    @Override
    public TerExpertsVo selByUserIdTer(Long userId){
        return this.baseMapper.selByUserIdTer(userId);
    }

    @Override
    public List<Long> selExpIds(Map map){
        return this.baseMapper.selExpIds(map);
    }
}
